-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi agent reinforcement training demo #797
Open
JingfeiPeng
wants to merge
5
commits into
develop
Choose a base branch
from
multi_agent_ppo_version_demo
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JingfeiPeng
commented
Apr 26, 2021
Gamenot
reviewed
Apr 28, 2021
Gamenot
reviewed
Apr 28, 2021
Gamenot
reviewed
Apr 28, 2021
Gamenot
reviewed
Apr 28, 2021
JingfeiPeng
force-pushed
the
multi_agent_ppo_version_demo
branch
from
April 29, 2021 21:06
b55d5b2
to
1d2caa2
Compare
JingfeiPeng
force-pushed
the
multi_agent_ppo_version_demo
branch
from
April 30, 2021 02:53
0659da8
to
313db28
Compare
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Game of Tag
This directory contains a a multi-agent adversarial training demo. In the demo, there is a predator vehicle and a prey vehicle.
The predator vehicle's goal is to catch the prey, and the prey vehicle's goal is to avoid getting caught.
Run training
python examples/game_of_tag/game_of_tag.py examples/game_of_tag/scenarios/game_of_tag_demo_map/
Run checkpoint
python examples/game_of_tag/run_checkpoint.py examples/game_of_tag/scenarios/game_of_tag_demo_map/
Setup:
Rewards
The formula for reward is 0.5/(distance-COLLIDE_DISTANCE)^2 and capped at 10
Common Reward:
Prey:
Predator:
Action:
Speed selection in m/s: [0, 3, 6, 9]
Lane change selection relative to current lane: [-1, 0, 1]
Output a model:
Currently Rllib does not have implementation for exporting a pytorch model.
Replace
export_model
's implementation inray/rllib/policy/torch_policy.py
to the following:Then follow the steps in game_of_tag.py to export the model.
Possible next steps
This requires modelling the reward to still be a zero sum game. The complication can be understood from
how to model the distance reward between 2 predators and 1 prey. If the reward is only from nearest predator
to nearest prey, the sum of predator and prey rewards will no longer be 0 because 2 predators will be getting full
reward from 1 prey but the prey will only get full reward from 1 predator. This will require the predators to know about each
other or the prey to know about other prey, and the prey to know about multiple predators.
help to let ego vehicle know whether it should slow down or speed up